package io.kimmking.statemachine02.squirrel;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class OrderService {

    @Autowired
    OrderMapper mapper;

    public int submitOrder(OrderDTO dto, OrderState state){
        System.out.println("OrderService - submitOrder:" + dto.toString());
        mapper.submitOrder(dto,state);
        return 1;
    }

    public int payOrder(OrderDTO dto, OrderState state){
        System.out.println("OrderService - payOrder:" + dto.toString());
        mapper.payOrder(dto,state);
        return 1;
    }

}
